package cn.hsw.platform.core.doc.contants;

import cn.hsw.platform.core.base.BaseConstant;

/**
 * @author 李子木
 * @date 权限相关配置
 */
public class AuthConstant extends BaseConstant {

    /**
     * 鉴权服务列表key
      */
    public static final String AUTH_AUTHENTICATION_LIST= "authentication_list";
    /**
     * 服务权限前缀
     */
    public static final String AUTH_PREFIX = "auth:";
    /**
     * token前缀
     */
    public static final String AUTH_TOKEN_PREFIX = "BEARER";
    /**
     * 用户token 前缀
     */
    public static final String AUTH_USER_TOKEN_PREFIX = "auth_user_token:";
    /**
     * 用户access_token 前缀
     */
    public static final String AUTH_USER_ACCESS_TOKEN_PREFIX = "auth_user_access_token:";
    /**
     * 用户缓存前缀
     */
    public static final String AUTH_USER_PREFIX = "auth_user:";
    /**
     * 角色权限列表
     */
    public static final String AUTH_ROLE_CODE_SET_PREFIX  = "auth_role_code:";

    /**
     * 无需鉴权code
     */
    public static final String NO_NEED_AUTHENTICATION_DEFAULT_CODE = "no:need:authentication";

    /**
     * 权限过期时间
     */
    public static final int TOKEN_EXPIRE_TIME = 1200;

    public static final int AUTH_ROLE_CODE_EXPIRE_TIME = 432000;

    public static final String AUTH_URL_PATTERN = "[0-9a-zA-Z_]{1,}";
}
